﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EasyLoger
{
    public class LogMessage
    {
        private string _message;
        private DateTime _date;
        public string Message
        {
            get
            {
                return this._message;
            }
            set
            {
                this._message = value;
            }
        }
        public DateTime Date
        {
            get
            {
                return this._date;
            }
            set
            {
                this._date = value;
            }
        }
        public LogMessage()
        {
            this._date = DateTime.Now;
        }
        public LogMessage(string msg)
        {
            this._message = msg;
            this._date = DateTime.Now;
        }
        public LogMessage(Exception ex)
        {
            this._message = ex.Message + "(" + ex.Source + ")";
            this._message = this._message + "\r\n" + ex.StackTrace;
            this._date = DateTime.Now;
        }
    }
}
